BTAlwaysFailure = BTDecorator:New()

local this = BTAlwaysFailure
this.name = "AlwaysFailure Task"

function this:New()
	local o = {}
	setmetatable(o, self)
	self.__index = self
	o.childTasks = {}
	return o
end

function this:OnUpdate()
	if (not self.currentChildTask) then
		self.currentChildTask = self:GetChild()
		if (not self.currentChildTask) then
			self.executionStatus = BTTaskStatus.Failure
			return BTTaskStatus.Failure
		end
	end
	self.executionStatus = self.currentChildTask:OnUpdate()

	if (self.executionStatus == BTTaskStatus.Running) then
		self.executionStatus = BTTaskStatus.Running
		return BTTaskStatus.Running
	else
		self.executionStatus = BTTaskStatus.Failure
		return BTTaskStatus.Failure
	end
end
function this:Reset()
	self.executionStatus = BTTaskStatus.Inactive
	BTParentTask.Reset(self)
end